﻿using System.Xml.Serialization;

namespace Toybox.NicoSharp.Live
{
	using Primitives;

	partial class PlayerStatus
	{
		/// <summary>
		/// ストリーム
		/// </summary>
		public class Stream : AbstractStream
		{
			/// <summary>
			/// タイトル
			/// </summary>
			public string title;

			/// <summary>
			/// 詳細
			/// </summary>
			public string description;

			/// <summary>
			/// コミュニティ
			/// </summary>
			public string default_community;

			/// <summary>
			/// 
			/// </summary>
			public int international;

			/// <summary>
			/// オーナーかどうか
			/// </summary>
			public bool is_owner;

			/// <summary>
			/// オーナーID
			/// </summary>
			public string owner_id;

			/// <summary>
			/// オーナー名
			/// </summary>
			public string owner_name;

			/// <summary>
			/// 予約枠
			/// </summary>
			public bool is_reserved;

			/// <summary>
			/// 来場者数
			/// </summary>
			public int watch_count;

			/// <summary>
			/// コメント数
			/// </summary>
			public int comment_count;

			/// <summary>
			/// 予約枠
			/// </summary>
			public bool is_rerun_stream;

			/// <summary>
			/// 
			/// </summary>
			public string bourbon_url;

			/// <summary>
			/// 
			/// </summary>
			public string full_video;

			/// <summary>
			/// 
			/// </summary>
			public string after_video;

			/// <summary>
			/// 
			/// </summary>
			public string before_video;

			/// <summary>
			/// Kickされた場合再生する動画
			/// </summary>
			public string kickout_video;

			/// <summary>
			/// ツイッタータグ
			/// </summary>
			public string twitter_tag;

			/// <summary>
			/// 男女モード
			/// </summary>
			public DanjoMode danjo_comment_mode;

			/// <summary>
			/// 30分制限なし？
			/// </summary>
			public string infinity_mode;

			/// <summary>
			/// タイムシフトかどうか
			/// </summary>
			public bool archive;

			/// <summary>
			/// 
			/// </summary>
			public Press press;

			/// <summary>
			/// 
			/// </summary>
			public string plugin_delay;

			/// <summary>
			/// 
			/// </summary>
			public string plugin_url;

			/// <summary>
			/// 
			/// </summary>
			[XmlArrayItem(@"plugin")]
			public Plugin[] plugin_urls;

			/// <summary>
			/// ネットデュエットの可否
			/// </summary>
			public bool allow_netduetto;

			/// <summary>
			/// ニコ電トークン
			/// </summary>
			public string nd_token;

			/// <summary>
			/// NGスコア
			/// </summary>
			public int ng_scoring;

			/// <summary>
			/// 
			/// </summary>
			public string header_comment;

			/// <summary>
			/// 
			/// </summary>
			public string footer_comment;

			/// <summary>
			/// 
			/// </summary>
			public string split_bottom;

			/// <summary>
			/// 
			/// </summary>
			public string split_top;

			/// <summary>
			/// 
			/// </summary>
			public string background_comment;

			/// <summary>
			/// フォントの大きさ
			/// </summary>
			public string font_scale;

			/// <summary>
			/// 
			/// </summary>
			public string comment_lock;

			/// <summary>
			/// テロップ
			/// </summary>
			public Telop telop;

			/// <summary>
			/// コンテンツリスト
			/// </summary>
			[XmlArrayItem(@"contents")]
			public Contents[] contents_list;

			/// <summary>
			/// 
			/// </summary>
			public string is_priority_prefecture;

			/// <summary>
			/// High-Quality Stream
			/// </summary>
			public bool hqstream;

			/// <summary>
			/// ニコ電話の可否
			/// </summary>
			public bool nicoden;

			public bool relay_comment;
			public bool is_dj_stream;

			/// <summary>
			/// クルーズかどうか（クルーズのみ）
			/// </summary>
			public string is_cruise_stream;

			public bool ichiba_notice_enable;

			public int timeshift_time;

			/// <summary>
			/// Queシート
			/// </summary>
			[XmlArrayItem(@"que")]
			public Que[] quesheet;

		}

		#region [SubClass]

		/// <summary>
		/// プラグイン
		/// </summary>
		public class Plugin
		{
			public int plugin_delay;
			public string plugin_url;
		}

		/// <summary>
		/// コンテンツ
		/// </summary>
		public class Contents
		{
			/// <summary>
			/// コンテンツID
			/// </summary>
			[XmlAttribute]
			public ContentType id;

			/// <summary>
			/// 音声無効
			/// </summary>
			[XmlAttribute]
			public bool disableAudio;

			/// <summary>
			/// 動画無効
			/// </summary>
			[XmlAttribute]
			public bool disableVideo;

			/// <summary>
			/// 開始時間
			/// </summary>
			[XmlAttribute]
			public int start_time;

			[XmlAttribute]
			public int duration;

			[XmlAttribute]
			public string title;

			[XmlText]
			public string content;
		}

		/// <summary>
		/// コンテンツキュー
		/// </summary>
		public class Que
		{
			[XmlAttribute]
			public int vpos;
			[XmlAttribute]
			public string mail;
			[XmlAttribute]
			public string name;

			[XmlText]
			public string que;
		}

		/// <summary>
		/// テロップ
		/// </summary>
		public class Telop
		{
			public bool enable;
		}

		public class Press
		{
			public int display_lines;
			public int display_time;
			public string style_conf;
		}

		#endregion [SubClass]

	}
}